﻿use housing 
go
deClare @street varchar(100),@yearMonth int
set @street='西门'
set @yearMonth=200904
delete from Applicant where	 app_applyid in (
select apply_id from apply where apply_street=@street
and effectDate>=@yearMonth
)

delete from Housing where	 hou_applyid in (
select apply_id from apply where apply_street=@street
and effectDate>=@yearMonth
)

delete from KindRecord where	 applyid in (
select apply_id from apply where apply_street=@street
and effectDate>=@yearMonth
)

delete from Property where	 pro_applyid in (
select apply_id from apply where apply_street=@street
and effectDate>=@yearMonth
)

delete from ReduceRecord where	 applyid in (
select apply_id from apply where apply_street=@street
and effectDate>=@yearMonth
)

delete from SubsidyRecord where	 applyid in (
select apply_id from apply where apply_street=@street
and effectDate>=@yearMonth
)

delete from Apply where  apply_street=@street
and effectDate>=@yearMonth
